import React, { Component } from 'react';
import { StyleSheet, Image, TouchableOpacity, Text, View } from 'react-native';
import { px2dp } from '../../../common/styles';
import  px2wp  from '../../../common/utils/px2wp';
import CarImgPreview from '../../four-s-shop/car-details/components/car-img-preview';
export default class ShowPic extends Component {
    constructor(props) {
        super(props);
        this.state={
            previewUrl:'',
            previewModalShow:false
        }
    }
    render() {
        const { source } = this.props;
        return (
            <View style={[styles.cardBtn]}>
                <Image
                 key={source.id}
                        resizeMode='stretch'
                        style={styles.cardImg}
                        source={{uri:source.url}}>
                    </Image>
              </View>
        );
    }
   
}
const styles = StyleSheet.create({
    cardBtn: {
        width:  px2wp(60),
        height: px2wp(60),
        borderRadius: px2dp(6) * 2,
        marginRight: px2dp(10) * 2,
    },
    cardImg: {
        width: '100%',
        height: '100%',
        borderRadius: px2dp(8) * 2,
    },
    newsTitle: {
        color: '#343332',
        fontSize: px2dp(14) * 2,
        paddingLeft: px2dp(10) * 2,
        paddingTop: px2dp(15),
        paddingRight: px2dp(10) * 2,
        paddingBottom: px2dp(15)
    }
});
